﻿@model IEnumerable<One.Models.Serial>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
 
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Author.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Excerpt)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ReadNum)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.MakeTime)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Author.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Excerpt)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ReadNum)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MakeTime)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
